package de.uni_saarland.coli.doclists.index;

/**
 * 
 * @author stefan
 * 
 *         dictionary interface
 */
public interface IDictionary extends IDiscIO {

	/**
	 * Maps a string to its id.
	 * 
	 * @param x
	 *            A <code>String</code>
	 * @return A <code>int</code> the strings id;
	 */
	public int getID(String x);

	/**
	 * Adds a string to its id.
	 * 
	 * @param x
	 *            A <code>String</code>
	 * @return A <code>int</code> the strings id;
	 */
	public int addID(String x);

	public boolean containsValue(String val);

	public boolean containsKey(int id);

	/**
	 * Maps an id to a string.
	 * 
	 * @param id
	 *            A <code>int</code> id.
	 * @return A <code>String</code> the ids string;
	 */
	public String getValue(int id);

	// TODO: Forward/backward ???
}
